#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int Nums(char* arr)
{
	int i = 0;
	int flag = 0;
	while (*(arr + i))
	{
		if (*(arr + i) != ' ')
		{
			flag++;
			i++;
			while (*(arr + i) != ' ')
			{
				if (*(arr + i) == '\0')
				{
					break;
				}
				i++;
			}
		}
		else if (*(arr + i) == ' ')
		{
			while (*(arr + i) == ' ')
			{
				if (*(arr + i) == '\0')
				{
					break;
				}
				i++;
			}
		}
	}
	return flag;
}
int main()
{
	int a = 0;
	int i = 0;
	char arr[50] = { 0 };
	scanf("%d", &a);
	for (i = 0; i < a; i++)
	{
		gets(arr);
		int count = Nums(arr);
		if (count == 2)
		{
			
		}
		else if (count == 3)
		{
			if (arr[0] == 'a')
			{
				int sz = 
				printf("%d+%d=%d\n",)
			}
		}
	}
		
	
	printf("%d ", count);


	return 0;
}